package com.cyy.admin.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * 报错时候页面处理器
 * author Chenyuyi
 * date 2021/12/16  10:14
 */
@Controller
@RequestMapping("/errorPage")
public class ErrorController {

    @RequestMapping("error{errorCode}")
    public String errorPage(@PathVariable("errorCode")String errorCode, HttpServletRequest request){
        request.setAttribute("errorCode",errorCode);
        return "error/error";
    }
}
